<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:s="http://jboss.org/seam/faces"
      xmlns:f="http://java.sun.com/jsf/core">
            
                <h:head>
                <title><ui:insert name="pageTitle">Page Title</ui:insert></title>
                <link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.request.contextPath}/css/main.css" />
                <style type="text/css">
                        body {
                                  font-family: Verdana, Arial, Helvetica, sans-serif;
                                  font-size: 14px;
                        }
                        .header {
                                  font-family: Verdana, Arial, Helvetica, sans-serif;
                                  font-size: 18px;
                        }
                        .bottom {
                                  font-family: Verdana, Arial, Helvetica, sans-serif;
                                  font-size: 9px;
                                  text-align: center;
                                  vertical-align: middle;
                                  color: #8E969D;
                        }
                </style>
                </h:head>

<body bgcolor="#ffffff">
<table style="border:1px solid #CAD6E0"  align="center" cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>

        <tr>
                <td class="header" height="42" align="center" valign="middle" width="100%" bgcolor="#E4EBEB">
                        <ui:insert name="pageHeader">Page Header</ui:insert> 
                        <h:form>
                    		<ui:fragment rendered="#{identity.loggedIn}">
                        		Bem vindo, #{((ComplexUser)identity.user).name}!<br/>
                        		<h:commandLink value="Log out" action="#{identity.logout}"/>                        		
                    		</ui:fragment>
                </h:form>
                </td>
                
        </tr>
        <tr>
                <td height="1" width="100%" bgcolor="#CAD6E0"></td>
        </tr>   

        <tr>
                <td width="100%"  colspan="2">
                        <table width="100%" style="height:150px" align="left" cellpadding="0" cellspacing="0" border="0">
                        <tbody>
                                <tr>
                                        <td align="center" width="100%" valign="middle" style="padding: 15px;">
                                        
                                        <ui:insert name="body">Page Body</ui:insert>
                                        
                                        </td>
                                </tr>
                        </tbody>
                        </table>
                </td>
        </tr>   
        
        <tr>
                <td colspan="2"  valign="bottom" height="1" width="100%" bgcolor="#CAD6E0"></td>
        </tr>
</tbody>
</table>
</body>
                
</html>